package view
{
    import flash.display.*;
    import flash.text.*;

    import model.GameModelLocator;
    import view.ImageLocator;

    public class BackFrame extends Sprite
    {
        private var userName:String;
        private var balance:Number;
        private var nameText:TextField;
        private var balanceText:TextField;
        private var backFrame:Bitmap;
        private var partnerLogo:Bitmap;
        private var infoFrame:Bitmap;

        public function BackFrame()
        {
            userName = GameModelLocator.getInstance().gameVo.userName;
            balance = GameModelLocator.getInstance().gameVo.balance;

            backFrame = new ImageLocator.BackgroundFrame();
            backFrame.x = -backFrame.width / 2;
            backFrame.y = -backFrame.height / 2;
            addChild(backFrame);

            partnerLogo = new ImageLocator.PartnerLogo();
            partnerLogo.x = -310;
            partnerLogo.y = 210;
            addChild(partnerLogo);

            infoFrame = new ImageLocator.UserInfo();
            infoFrame.x = 34;
            infoFrame.y = 210;
            addChild(infoFrame);

            nameText = new TextField();
            nameText.x = 50;
            nameText.y = 210;
            nameText.textColor = 0xFFFFFF;
            nameText.htmlText = "<b><font size='16'>" + userName + "</font></b>";
            nameText.selectable = false;
            addChild(nameText);

            balanceText = new TextField();
            balanceText.x = 180;
            balanceText.y = 210;
            balanceText.textColor = 0xFFFFFF;
            balanceText.htmlText = "<b><font size='16'>€" + balance + "</font></b>";
            balanceText.selectable = false;
            addChild(balanceText);
        }

        public function display():void
        {
        }
    }
}
